package com.git_demo.service.impl;

import com.git_demo.bean.Classes;
import com.git_demo.mapper.ClassesMapper;
import com.git_demo.service.ClassService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * @author 金振宇
 * @describe
 */
@Service
@Component
public class ClassServiceImpl implements ClassService {

    @Autowired
    ClassesMapper classesMapper;

    @Override
    public List<Classes> findAllClasses() {
        List<Classes> list = classesMapper.findAllClasses();
        return list;
    }

    @Override
    public void addClass(Classes classes) {
        classesMapper.insertSelective(classes);
    }
}
